/*
 * Created by LiuYou on 2020/12/15.
 *
 */

#include "../Pc.hpp"
#include <utility>
#include "../Display.hpp"
#include "../GraphicsCard.hpp"

// 1.0
/*Pc::Pc::Pc(const std::shared_ptr<Display>& sharedPtrDisplay, const std::shared_ptr<GraphicsCard>& sharedPtrGraphicsCard)
        : sharedPtrDisplay(sharedPtrDisplay), sharedPtrGraphicsCard(sharedPtrGraphicsCard) {}*/

// 2.0
/*Pc::Pc::Pc(std::shared_ptr<Display> sharedPtrDisplay, std::shared_ptr<GraphicsCard> sharedPtrGraphicsCard)
        : sharedPtrDisplay(std::move(sharedPtrDisplay)), sharedPtrGraphicsCard(std::move(sharedPtrGraphicsCard)) {}*/

Pc::Pc::Pc(std::shared_ptr<Display> sharedPtrDisplay, std::shared_ptr<GraphicsCard>&& sharedPtrGraphicsCard) noexcept
        : sharedPtrDisplay(std::move(sharedPtrDisplay)), sharedPtrGraphicsCard(std::move(sharedPtrGraphicsCard)) {}

void Pc::Pc::getDisplayShow() {
    sharedPtrDisplay->show();

}

void Pc::Pc::getGraphicsCardShow() {
    sharedPtrGraphicsCard->show();
}

const std::shared_ptr<Pc::Display>& Pc::Pc::getSharedPtrDisplay() const {
    return sharedPtrDisplay;
}

const std::shared_ptr<Pc::GraphicsCard>& Pc::Pc::getSharedPtrGraphicsCard() const {
    return sharedPtrGraphicsCard;
}

/*Pc::Display Pc::Pc::getDisplay() {
    return *sharedPtrDisplay;
}

Pc::GraphicsCard Pc::Pc::getGraphicsCard() {
    return *sharedPtrGraphicsCard;
}*/

Pc::Pc::~Pc() = default;
